package com.itheima.controller;

import com.itheima.pojo.ClassCount;
import com.itheima.pojo.Result;
import com.itheima.servise.ClazzStudentCountServise;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/report")
public class ClazzStudentCountController {
    @Autowired
    private ClazzStudentCountServise clazzStudentCountServise;

    // 统计学生学历情况
    @GetMapping("/studentDegreeData")
    public Result studentDegreeData(){
        List<Map> maps = clazzStudentCountServise.countStudentDegree();
        return Result.success(maps);
    }

    //班级人数统计
    @GetMapping("/studentCountData")
    public Result studentCountData(){
        ClassCount maps = clazzStudentCountServise.countStudentCount();
        return Result.success(maps);
    }



}
